<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
//特碼樣版
$arrCon = file($strTemplatePath."NumberTemplate1.html");
$strCon1 = join("", $arrCon);
$strCon1 = str_replace(chr(13), "", $strCon1);
$strCon1 = str_replace(chr(10), "", $strCon1);

$arrCon = file($strTemplatePath."NumberTemplate1Sort.html");
$strCon1Sort = join("", $arrCon);
$strCon1Sort = str_replace(chr(13), "", $strCon1Sort);
$strCon1Sort = str_replace(chr(10), "", $strCon1Sort);

//平碼 1-4
$arrCon = file($strTemplatePath."NumberTemplate5.html");
$strCon5 = join("", $arrCon);
$strCon5 = str_replace(chr(13), "", $strCon5);
$strCon5 = str_replace(chr(10), "", $strCon5);

//平碼 1-4 單雙大小...
$arrCon = file($strTemplatePath."NumberTemplate11.html");
$strCon11 = join("", $arrCon);
$strCon11 = str_replace(chr(13), "", $strCon11);
$strCon11 = str_replace(chr(10), "", $strCon11);

//過關
$arrCon = file($strTemplatePath."NumberTemplate14.html");
$strCon14 = join("", $arrCon);
$strCon14 = str_replace(chr(13), "", $strCon14);
$strCon14 = str_replace(chr(10), "", $strCon14);

//連碼
$arrCon = file($strTemplatePath."NumberTemplate15.html");
$strCon15 = join("", $arrCon);
$strCon15 = str_replace(chr(13), "", $strCon15);
$strCon15 = str_replace(chr(10), "", $strCon15);

$arrCon = file($strTemplatePath."NumberTemplate15Sort.html");
$strCon15Sort = join("", $arrCon);
$strCon15Sort = str_replace(chr(13), "", $strCon15Sort);
$strCon15Sort = str_replace(chr(10), "", $strCon15Sort);

//2~5 不中
$arrCon = file($strTemplatePath."NumberTemplate25.html");
$strCon25 = join("", $arrCon);
$strCon25 = str_replace(chr(13), "", $strCon25);
$strCon25 = str_replace(chr(10), "", $strCon25);

$arrCon = file($strTemplatePath."NumberTemplate25Sort.html");
$strCon25Sort = join("", $arrCon);
$strCon25Sort = str_replace(chr(13), "", $strCon25Sort);
$strCon25Sort = str_replace(chr(10), "", $strCon25Sort);

//尾數
$arrCon = file($strTemplatePath."NumberTemplate29.html");
$strCon29 = join("", $arrCon);
$strCon29 = str_replace(chr(13), "", $strCon29);
$strCon29 = str_replace(chr(10), "", $strCon29);

//尾數連
$arrCon = file($strTemplatePath."NumberTemplate30.html");
$strCon30 = join("", $arrCon);
$strCon30 = str_replace(chr(13), "", $strCon30);
$strCon30 = str_replace(chr(10), "", $strCon30);

//已開獎樣版
$arrCon = file($strTemplatePath."StartGameTemplate.html");
$strConSG = join("", $arrCon);
$strConSG = str_replace(chr(13), "", $strConSG);
$strConSG = str_replace(chr(10), "", $strConSG);
foreach($_strOperate10M as $k => $v){
	$strCon1 = str_replace("{".$k."}", $v, $strCon1);
	$strCon1Sort = str_replace("{".$k."}", $v, $strCon1Sort);
	$strCon5 = str_replace("{".$k."}", $v, $strCon5);
	$strCon11 = str_replace("{".$k."}", $v, $strCon11);
	$strCon14 = str_replace("{".$k."}", $v, $strCon14);
	$strCon15 = str_replace("{".$k."}", $v, $strCon15);
	$strCon15Sort = str_replace("{".$k."}", $v, $strCon15Sort);
	$strCon25 = str_replace("{".$k."}", $v, $strCon25);
	$strCon25Sort = str_replace("{".$k."}", $v, $strCon25Sort);
	$strCon29 = str_replace("{".$k."}", $v, $strCon29);
	$strCon30 = str_replace("{".$k."}", $v, $strCon30);
	$strConSG = str_replace("{".$k."}", $v, $strConSG);
}
//尾數
for($i = 0; $i <= 9; $i++){
	$strCon29 = str_replace("{Mantissa".$i."}", $i."&nbsp;".$_strSame_String["Mantissa"], $strCon29);
	$strCon30 = str_replace("{Mantissa".$i."}", $i."&nbsp;".$_strSame_String["Mantissa"], $strCon30);
}
//平碼 1- 4
for($i = 1; $i <= 4; $i++){
	$strCon11 = str_replace("{NormalNo".$i."}", $_strSame_String["NormalNo".$i], $strCon11);
	$strCon14 = str_replace("{NormalNo".$i."}", $_strSame_String["NormalNo".$i], $strCon14);
}
$strCon11 = str_replace("{SOdd}", $_strSame_String["SOdd"], $strCon11);
$strCon11 = str_replace("{SEven}", $_strSame_String["SEven"], $strCon11);

$strCon = "var strLayer1=\"".addslashes($strCon1)."\";\n";
$strCon .= "var strLayer1Sort=\"".addslashes($strCon1Sort)."\";\n";
$strCon .= "var strLayer5=\"".addslashes($strCon5)."\";\n";
$strCon .= "var strLayer11=\"".addslashes($strCon11)."\";\n";
$strCon .= "var strLayer14=\"".addslashes($strCon14)."\";\n";
$strCon .= "var strLayer15=\"".addslashes($strCon15)."\";\n";
$strCon .= "var strLayer15Sort=\"".addslashes($strCon15Sort)."\";\n";
$strCon .= "var strLayer25=\"".addslashes($strCon25)."\";\n";
$strCon .= "var strLayer25Sort=\"".addslashes($strCon25Sort)."\";\n";
$strCon .= "var strLayer29=\"".addslashes($strCon29)."\";\n";
$strCon .= "var strLayer30=\"".addslashes($strCon30)."\";\n";
$strCon .= "var strLayerStart=\"".addslashes($strConSG)."\";\n";

$strFile = __Root_Path."/inc/OperateTemp10M".$_intLang.".js";
if(!writeFile($strFile, $strCon, "w"))ErrMsgOutputHTML("Error", "", 1);
/*=================================================================
header("Cache-Control: no-store, no-cache, must-revalidate");	  // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");															  // HTTP/1.0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8 print $_Charset;?>">
<script language="JavaScript">
<!--
parent.strLayer010203="<?php print addslashes($strCon010203);?>";
parent.strLayer040506="<?php print addslashes($strCon040506);?>";
parent.strLayer0711="<?php print addslashes($strCon0711);?>";
parent.strLayer121314="<?php print addslashes($strCon121314);?>";
parent.strLayer15="<?php print addslashes($strCon15);?>";
parent.strLayer1718="<?php print addslashes($strCon1718);?>";
parent.strLayer1920="<?php print addslashes($strCon1920);?>";
parent.strLayer2126="<?php print addslashes($strCon2126);?>";
parent.strLayerStart="<?php print addslashes($strConSG);?>";
parent.iniNumber(1);
//-->
</script>*/?>